﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Headlight.Model;
using System.Data.Entity;

namespace Headlight.Domain.Repositories
{
	public class PolicyRepository
	{
        private EFDbContext context = new EFDbContext();

        public IQueryable<Policy> Products
        {
            get { return context.Policies; }
        }

        public void SaveProduct(Policy policy)
        {
            if (policy.PolicyID == 0)
            {
                context.Policies.Add(policy);
            }
            context.SaveChanges();
        }
	}
}